package ch04.demo;

import org.junit.After;
import org.junit.Test;


public class JedisTest {
    private JedisAPI jedisAPI;

    @org.junit.Before
    public void startU() throws Exception{
        jedisAPI=new JedisAPI();
    }

    @After
    public void tearDown() throws Exception{
        if(jedisAPI !=null)
           jedisAPI.destroy();
    }
    @Test
    public void test(){
     // assertNull(jedisAPI.get("haha"));
        jedisAPI.set("age","18");
        System.out.println(jedisAPI.get("age"));
        System.out.println(jedisAPI.ttl("age"));
        jedisAPI.delete("age");
    }
}
